<template>
  <div class="waic">
    <!-- 中间和头部 -->
    <!-- <div class="box">
      <header class="tou">头部</header>
      <main class="zhong">中间</main>
    </div> -->
    <!-- 底部 -->
     <router-view></router-view>
    <footer class="di">
      <van-tabbar v-model="active" router>
        <van-tabbar-item to="/" icon="smile-o">首页</van-tabbar-item>
        <van-tabbar-item to="/kind" icon="apps-o">分类</van-tabbar-item>
        <van-tabbar-item to="/cart" icon="shopping-cart-o">购物车</van-tabbar-item>
        <van-tabbar-item to="/user" icon="user-o">我的</van-tabbar-item>
      </van-tabbar>
    </footer>
  </div>
</template>
<script setup>
import { ref } from 'vue';

  const active = ref(0);
</script>
<style lang="scss">
* {
  margin: 0;
  padding: 0;
  list-style: none;
}
html,
body,
#app,
.waic {
  width: 100%;
  height: 100%;
}
.waic {
  display: flex;
  flex-direction: column;
  .box {
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
    .tou {
      height: 50px;
      line-height: 50px;
      background: yellow;
    }
    .zhong {
      flex: 1;
      overflow: auto;
    }
  }
  .di {
    .van-tabbar-item--active{
      color: red;
    }
  }
}
</style>
